package com.scedu.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.sql.Date;


@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
@TableName("tb_employee")
public class Employee {
    //@TableId(type=IdType.ASSIGN_ID) //雪花算法 默认算法
   // @TableId(type=IdType.ASSIGN_UUID) // UUID
    @TableId(type=IdType.AUTO) // 数据库自增
    //@TableId(type=IdType.INPUT) // 手动输入
    private Long id;
    private String name;
    private String email;
    private Integer gender;
    private Integer age;
    @TableField(fill = FieldFill.INSERT) //更新时填充字段
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE) //插入和更新时填充字段
    private Date updateTime;
    @Version
    private Integer version;
    @TableLogic
    private Integer deleted;
}
